<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateMessageGiftTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('gift', function (Blueprint $table) {
            $table->smallIncrements('id');
            $table->string('name', 10)->default('')->comment('礼物名字');
            $table->string('icon', 50)->default('')->comment('礼物图片');
            $table->string('show_image', 20)->default('')->comment('礼物特效图片');
            $table->smallInteger('coin')->default(0)->comment('礼物对应金币数');
            $table->tinyInteger('type')->default(1)->comment('礼物类型');
            $table->tinyInteger('flag')->default(1)->comment('是否有效');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('message_gift');
    }
}
